package com.briup.product_source.web.controller;

import com.briup.product_source.service.AnalysisService;
import com.briup.product_source.util.Response;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @Author lining
 * @Date 2023/6/23
 */
@RequestMapping("/analysis")
@RestController
public class AnalysisController {
    @Autowired
    private AnalysisService service;

    @GetMapping("/count")
    public Response count(){
        Map<String, List<Object>> map = service.countNum();
        return Response.success(map);
    }
    @GetMapping("/countSales")
    public Response countSale(){
        Map<String, List<Object>> map = service.countSales();
        return Response.success(map);
    }
}
